<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://www.sf.net/frails" prefix="fr"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<f:view>
	<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
		<head>
			<meta http-equiv="pragma" content="no-cache" />
			<meta http-equiv="cache-control" content="no-cache" />
			<meta http-equiv="expires" content="0" />
			<meta http-equiv="keywords" content="keyword1,keyword2,keyword3" />
			<meta http-equiv="description" content="This is my page" />
			<title><h:outputText value="#{$bundle.page_title_user_cdm}" />
			</title>
		</head>
		<body>
			<h1>
				<h:outputText value="#{$bundle.page_title_user_cdm}" />
				<font size="2">你好: <h:outputText value="#{$.loginUser.loginName}" /> </font>
			</h1>

			<h:form>
			用户信息
			<hr />
				<table>
					<tr>
						<td>
							<h:outputLabel value="#{$bundle.label_user_loginName}"></h:outputLabel>
						</td>
						<td>
							<h:inputText value="#{$.loginUser.loginName}" required="true" readonly="true" />
						</td>
					</tr>

					<tr>
						<td>
							<h:outputLabel value="#{$bundle.label_user_email}"></h:outputLabel>
						</td>
						<td>
							<h:inputText size="" value="#{$.loginUser.email}" required="true" readonly="true" />
						</td>
					</tr>
					<tr>
						<td>
							<h:outputLabel value="#{$bundle.label_user_userName}"></h:outputLabel>
						</td>
						<td>
							<h:inputText size="" value="#{$.loginUser.userName}" required="true" readonly="true" />
						</td>
					</tr>
					<tr>
						<td>
							<h:outputLabel value="#{$bundle.label_user_password}"></h:outputLabel>
						</td>
						<td>
							<h:inputText size="" value="#{$.loginUser.password}" required="true" readonly="true" />
						</td>
					</tr>
					<tr>
						<td>
							<h:outputLabel value="#{$bundle.label_user_userRole}"></h:outputLabel>
						</td>
						<td>
							<h:selectOneMenu required="true" value="#{$.loginUser.userRole}" requiredMessage="you are required" disabled="true"
								readonly="true">
								<f:selectItem value="#{$.roleList}" />
							</h:selectOneMenu>
						</td>
					</tr>
					<tr>
						<td>
							<h:outputLabel value="#{$bundle.label_user_phone}"></h:outputLabel>
						</td>
						<td>
							<h:inputText size="" value="#{$.loginUser.phone}" required="true" readonly="true" />
						</td>
					</tr>
					<tr>
						<td>
						</td>
						<td>

							<h:commandButton value="修改" actionListener="#{$.modify}" />
						</td>
					</tr>
				</table>
			</h:form>
			<h:form>
			审核用户
			cp
					未审核用户
			<hr />

				<h:dataTable value="#{$.unauthcps}" var="user" headerClass="headerClass" rowClasses="rowClass"
					columnClasses="colClass1,colClass2" styleClass="tableClass">
					<h:column>
						<f:facet name="header">
							<h:outputText value="#{$bundle.label_user_userId}" />
						</f:facet>
						<h:outputText value="#{user.userId}" />
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="#{$bundle.label_user_loginName}" />
						</f:facet>
						<h:outputText value="#{user.loginName}" />
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="#{$bundle.label_user_userName}" />
						</f:facet>
						<h:outputText value="#{user.userName}" />
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="#{$bundle.label_user_email}" />
						</f:facet>
						<h:outputText value="#{user.email}" />
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="#{$bundle.label_user_phone}" />
						</f:facet>
						<h:outputText value="#{user.phone}" />
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="#{$bundle.label_user_userRole}" />
						</f:facet>
						<h:outputText value="#{user.userRole}" />
					</h:column>

					<h:column>
						<f:facet name="header">
							<h:outputText value="#{$bundle.label_auth_user}" />
						</f:facet>
						<h:commandLink action="#{$.auth}" value="#{$bundle.label_auth_user}" />
					</h:column>
				</h:dataTable>
				<br />
			sp
					未审核用户
			<hr />

				<h:dataTable value="#{$.unauthsps}" var="user" headerClass="headerClass" rowClasses="rowClass"
					columnClasses="colClass1,colClass2" styleClass="tableClass">
					<h:column>
						<f:facet name="header">
							<h:outputText value="#{$bundle.label_user_userId}" />
						</f:facet>
						<h:outputText value="#{user.userId}" />
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="#{$bundle.label_user_loginName}" />
						</f:facet>
						<h:outputText value="#{user.loginName}" />
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="#{$bundle.label_user_userName}" />
						</f:facet>
						<h:outputText value="#{user.userName}" />
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="#{$bundle.label_user_email}" />
						</f:facet>
						<h:outputText value="#{user.email}" />
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="#{$bundle.label_user_phone}" />
						</f:facet>
						<h:outputText value="#{user.phone}" />
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="#{$bundle.label_user_userRole}" />
						</f:facet>
						<h:outputText value="#{user.userRole}" />
					</h:column>

					<h:column>
						<f:facet name="header">
							<h:outputText value="#{$bundle.label_auth_user}" />
						</f:facet>
						<h:commandLink action="#{$.auth}" value="#{$bundle.label_auth_user}" />
					</h:column>
				</h:dataTable>
			</h:form>
			<br />
			<h:form>
				节目信息
				<h:dataTable value="#{$.contents}" var="content" headerClass="headerClass" rowClasses="rowClass"
					columnClasses="colClass1,colClass2" styleClass="tableClass">

					<h:column>
						<f:facet name="header">
							<h:outputText value="#{$bundle.label_content_dcid}"></h:outputText>
						</f:facet>
						<h:outputText value="#{content.dcid}" />
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="#{$bundle.label_content_contentName}"></h:outputText>
						</f:facet>
						<h:outputText value="#{content.contentName}" />
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="#{$bundle.label_content_contentLength}"></h:outputText>
						</f:facet>
						<h:outputText value="#{content.contentLength}" />
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="#{$bundle.label_content_description}"></h:outputText>
						</f:facet>
						<h:outputText value="#{content.description}" />
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="#{$bundle.label_content_director}"></h:outputText>
						</f:facet>
						<h:outputText value="#{content.director}" />
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="#{$bundle.label_content_productor}"></h:outputText>
						</f:facet>
						<h:outputText value="#{content.productor}" />
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="#{$bundle.label_content_actor}"></h:outputText>
						</f:facet>
						<h:outputText value="#{content.actor}" />
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="#{$bundle.label_content_contentType}"></h:outputText>
						</f:facet>
						<h:outputText value="#{content.contentType}" />
					</h:column>
				</h:dataTable>

				<hr />

				<h:commandButton id="aaa" value="#{$bundle.title_new}" action="#{$.create}" immediate="true" styleClass="plat" />

				<fr:validatorScript clientValidation="true" />

			</h:form>
		</body>
	</html>
</f:view>
